package com.bw.sofa_module.detail;

import com.bw.sofa_module.detail.entity.RecommentEntity;
import com.bw.sofa_module.detail.entity.delete.DeleteEntity;
import com.bw.sofa_module.detail.entity.select.RecommentSelectEntity;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface ApiService {
    @GET("serverdemo/comment/queryFeedComments?id=0")
    Observable<RecommentSelectEntity> requestAllComment(@Query("itemId")long itemId,
                                                        @Query("pageCount")int pageCount,
                                                        @Query("userId")int userId);

    @POST("serverdemo/comment/addComment")
    Observable<RecommentEntity> requestRecomment(@Query("commentText")String commentText,
                                                 @Query("height")int height,
                                                 @Query("image_url")String image_url,
                                                 @Query("itemId")long itemId,
                                                 @Query("userId")int userId,
                                                 @Query("video_url")String video_url,
                                                 @Query("width")int width);

    @GET("serverdemo/comment/deleteComment")
    Observable<DeleteEntity> requestDeleteCommit(@Query("commentId")long commentId,
                                               @Query("itemId")long itemId,
                                               @Query("userId")long userId);
}
